package vn.edu.saigontech.ncms.web.teacher.report.haftmonth;

public class TeacherTeachingDetailRow {

	private Long id;
	private String firstName;
	private String midName;
	private String lastName;
	private int totalSessions;
	
	public TeacherTeachingDetailRow(Long id, String firstName, String midName, String lastName, int totalSessions) {
		this.id = id;
		this.firstName = firstName;
		this.midName = midName;
		this.lastName = lastName;
		this.totalSessions = totalSessions;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getMidName() {
		return midName;
	}

	public void setMidName(String midName) {
		this.midName = midName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public int getTotalSessions() {
		return totalSessions;
	}

	public void setTotalSessions(int totalSessions) {
		this.totalSessions = totalSessions;
	}
	
	public String getFullName() {
		return new StringBuilder(this.lastName).append(" ").append((this.midName != null?
				this.midName+" " : "")).append(this.firstName).toString();
	}
	
	public void increaseTotalSessionsBy(int number) {
		this.totalSessions++;
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	public boolean equals(TeacherTeachingDetailRow that) {
		return this.getId().equals(that.getId());
	}
}